/*
 *   AS IS License
 * ==Naive Coders==
 */
package org.naive.metawatch.converter.cap;

import java.text.ParseException;
import org.naive.metawatch.converter.parser.FieldSize;
import org.naive.metawatch.converter.parser.ParsedIntArray;
import org.naive.metawatch.converter.parser.cap.CapParseContext;
import org.naive.metawatch.converter.parser.cap.CapParseable;
import org.naive.metawatch.converter.parser.cap.ParsedArrayTillBlockEnds;

/**
 *
 * @author gbu.000
 */
public class CapTypeDescriptorInfo extends CapParseable {

    @ParsedIntArray(indexSize = FieldSize.SHORT, itemSize = FieldSize.SHORT)
    public short[] constant_pool_types;
    @ParsedArrayTillBlockEnds(itemClass = CapTypeDescriptor.class)
    public CapTypeDescriptor[] typeDescriptors;

    @Override
    public void parse(CapParseContext px) throws ParseException {
        super.parse(px);
        for (int i = 0; i < typeDescriptors.length; i++) {
            if (u(typeDescriptors[i].type[0]) > 0xE) {
                System.out.print(i);
            }
        }
    }
}
